<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="../common.jsp"%>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title></title>
</head>

<body>
	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
	    <li><a href="#">管理信息</a></li>
	    <li><a href="#">公告</a></li>
	    </ul>
	 </div>

<!-- 添加用户form    此节点内部的内容会在弹出框内显示,默认隐藏此节点   -->
    <div id="notice_content" class="hidden" style="display:none;">
      <form id="noticeForm" class="form-horizontal" method="post" action="">
        <div class="row">
      		<div class="control-group span12">
            	<label class="control-label">标题:</label>
            	<div class="controls">
              		<input type="text" class="input-normal control-text" name="title" id="title">
              		<span class="validate_color">*</span>
            	</div>
            	
         	 </div>
        </div>
        <div class="row">
          	<div class="control-group span12">
           		<label class="control-label">创建日期:</label>
            	<div class="controls">
					 <input type="text" onclick='WdatePicker({dateFmt:"yyyy-MM-dd HH:mm:ss",readOnly:true})' id="createDate" name="createDate" class="input-normal control-text" >
              		 <span class="validate_color">*</span>
            	</div>
           
          	</div>
          <div class="control-group span15"> 
             <label class="control-label">内容:</label>
            	<div class="controls control-row4">
			  		<textarea class="input-large" name="memo" id="memo"></textarea>
			  		<span class="validate_color">*</span>
             	</div>
            
          </div>
        </div>
          <div><input type="text" name="type" style="display: none;" id="type"/></div>

      </form>
    </div>

    <div class="rightinfo" >
    
    <div class="tools">
    
    	<ul class="toolbar">
         <li class="pmsncontrol" id="btnShow"><span><img src="${path}/images/t01.png" /></span>添加</li>
         <li class="pmsncontrol" onclick="del_notice('noticeSelectCbx')"><span><img src="${path}/images/t03.png" ></span>删除</li>       
        </ul>
       	
       	<ul class="toolbar1">
    	 <li onclick="showNoticePageDataList(1)"><span><img src="${path}/images/t04.png" /></span>查询</li>
        </ul>
       	<ul class="toolbar2">
       	 <li><input type="text" id="search_title" value="${chaxun}" style="margin-top:3px;"></li>
       	</ul>
        
        
    
    </div>
    <table class="tablelist" id="noticeTable">
    	<thead>
    	<tr>
        <th class="cbx"><input name="" type="checkbox" value="" id="noticeSelectAll" onclick="selectAllCheck('noticeSelectAll','noticeSelectCbx')"/></th>
        <th>标题</th>
        <th>发布人</th>
		<th>发布时间</th>
        <th class="operate">操作</th>
        </tr>
        </thead>
  	 	<c:if test="${!empty noticePageInfo}">
  	 		<c:forEach items="${NoticeList }" var="noticeList">
  	 			<tr>
			        <td><input name="noticeSelectCbx" id='notice_${noticeList.id}' type="checkbox" value="" onclick="cbxCheck('noticeSelectAll','noticeSelectCbx');"/></td>
			        <td title="${noticeList.title}"><script type="text/javascript">document.write(getSubstr('${noticeList.title}',15))</script></td>
			        <td title="${noticeList.userName}"><script type="text/javascript">document.write(getSubstr('${noticeList.userName}',15))</script></td>
			        <td title="${noticeList.createDate}">${noticeList.createDate}</td>
			        <td>
			        	<ul class="tabletoolbar"  id='notice_operate${noticeList.id}'>
			        		<li onclick="noticeEdit('${noticeList.id}')"><span><img src="${path}/images/table_t01.png"></span>查看</li>
			        		<li class="pmsncontrol" onclick="messageAlert(4,'你确定要删除选择的用户吗？',function(){choose_open,deleteNotice(${noticeList.id})},1)"><span><img src="${path}/images/table_t02.png"></span>删除</li>
			        	</ul>	
      				</td>
       			 </tr> 
  	 		</c:forEach>
  	 	</c:if> 
        </tbody>
    </table>
	
    <div id="notice_box">
    </div>
    
    </div>
    <script type="text/javascript">
	$(function(){
		noticeManagerInit();
		if(window.parent.currentUserPmsn == normalLimit){
			pmsnControl();
		}
		getDivPage("notice",'${noticePageInfo}',showNoticePageDataList);
	});
	</script>
</body>
</html>